package xiongwei.jiang.constant;

/**
 * 企业微信接口地址常量类
 *
 * @author 天之蓝
 */
public class WXWorkApiConstants {
    /**
     * 禁止实例化
     */
    private WXWorkApiConstants() {
    }

    /**
     * 网页授权
     */
    public static final String AUTHORIZE_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=CORPID&redirect_uri=REDIRECT_URI&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
    /**
     * 扫码登录
     */
    public static final String QR_CONNECT_URL = "https://open.work.weixin.qq.com/wwopen/sso/qrConnect?appid=CORPID&agentid=AGENTID&redirect_uri=REDIRECT_URI&state=STATE";
    /**
     * 获取 token
     */
    public static final String GET_TOKEN_URL = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=%s&corpsecret=%s";
    /**
     * 获取工号
     */
    public static final String GET_USER_ID_URL = "https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo?access_token=%s&code=%s";
    /**
     * 获取 user 信息
     */
    public static final String GET_USER_INFO_URL = "https://qyapi.weixin.qq.com/cgi-bin/user/get?access_token=%s&userid=%s";
    /**
     * 获取 department 部门列表
     */
    public static final String GET_DEPARTMENT_INFO_URL = "https://qyapi.weixin.qq.com/cgi-bin/department/list?access_token=%s&id=%s";
    /**
     * 获取 department 部门 user 简单信息
     */
    public static final String GET_DEPARTMENT_USER_URL = "https://qyapi.weixin.qq.com/cgi-bin/user/simplelist?access_token=%s&department_id=%s&fetch_child=%s";
    /**
     * 获取 tag 标签列表（token 必须由通讯录 secret 获取）
     */
    public static final String GET_TAG_INFO_URL = "https://qyapi.weixin.qq.com/cgi-bin/tag/list?access_token=%s";
    /**
     * 获取 tag 标签 user 简单信息（token 必须由通讯录 secret 获取）
     */
    public static final String GET_TAG_USER_URL = "https://qyapi.weixin.qq.com/cgi-bin/tag/get?access_token=%s&tagid=%s";
    /**
     * 发送文本消息
     */
    public static final String POST_SEND_MSG_URL = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=%s";
    /**
     * 上传临时素材
     */
    public static final String POST_UPLOAD_TEMP_URL = "https://qyapi.weixin.qq.com/cgi-bin/media/upload?access_token=%s&type=%s";
    /**
     * 上传图片
     */
    public static final String POST_UPLOAD_IMAGE_URL = "https://qyapi.weixin.qq.com/cgi-bin/media/uploadimg?access_token=%s";
    /**
     * 获取临时素材
     */
    public static final String GET_DOWNLOAD_TEMP_URL = "https://qyapi.weixin.qq.com/cgi-bin/media/get?access_token=%s&media_id=%s";
    /**
     * 获取高清语音素材
     */
    public static final String GET_DOWNLOAD_VOICE_URL = "https://qyapi.weixin.qq.com/cgi-bin/media/get/jssdk?access_token=%s&media_id=%s";
    /**
     * 获取打卡记录（token 必须由打卡 secret 获取）
     */
    public static final String POST_CHECKIN_DATA_URL = "https://qyapi.weixin.qq.com/cgi-bin/checkin/getcheckindata?access_token=%s";
    /**
     * 获取 jsapi_ticket
     */
    public static final String GET_JSAPI_TICKET_URL = "https://qyapi.weixin.qq.com/cgi-bin/get_jsapi_ticket?access_token=%s";
    /**
     * 获取 jsapi_ticket_agent
     */
    public static final String GET_JSAPI_TICKET_AGENT_URL = "https://qyapi.weixin.qq.com/cgi-bin/ticket/get?access_token=%s&type=agent_config";
    /**
     * 获取企业微信服务器的 ip 段
     */
    public static final String GET_CALLBACK_IP_URL = "https://qyapi.weixin.qq.com/cgi-bin/getcallbackip?access_token=%s";
}
